function g1 = static_g1(T, y, x, params, T_flag)
% function g1 = static_g1(T, y, x, params, T_flag)
%
% File created by Dynare Preprocessor from .mod file
%
% Inputs:
%   T         [#temp variables by 1]  double   vector of temporary terms to be filled by function
%   y         [M_.endo_nbr by 1]      double   vector of endogenous variables in declaration order
%   x         [M_.exo_nbr by 1]       double   vector of exogenous variables in declaration order
%   params    [M_.param_nbr by 1]     double   vector of parameter values in declaration order
%                                              to evaluate the model
%   T_flag    boolean                 boolean  flag saying whether or not to calculate temporary terms
%
% Output:
%   g1
%

if T_flag
    T = model_htm.static_g1_tt(T, y, x, params);
end
g1 = zeros(36, 36);
g1(1,9)=(-(params(4)*(1-params(3))));
g1(1,11)=params(1);
g1(1,15)=(-(params(3)*T(1)*(-params(13))*(1-T(1))));
g1(1,20)=(-(params(1)-params(4)*(1-params(3))));
g1(2,10)=(-((1-params(3))*(1-params(4))));
g1(2,12)=1-params(1);
g1(2,15)=(-(T(1)*params(3)*params(13)*(1-T(1))));
g1(2,20)=(-(params(3)*(1-T(1))));
g1(3,11)=(-(params(8)*(1-params(11))*(1-params(11)*params(9))));
g1(3,13)=params(11)-params(11)*params(9);
g1(3,15)=(-((1-params(11))*(1-params(11)*params(9))*(-(1-T(1)))));
g1(3,20)=(-((1-params(11))*(1-params(11)*params(9))*params(7)));
g1(4,12)=(-(params(8)*(1-params(12))*(1-params(9)*params(12))));
g1(4,14)=params(12)-params(9)*params(12);
g1(4,15)=(-(T(1)*(1-params(12))*(1-params(9)*params(12))));
g1(4,20)=(-(params(7)*(1-params(12))*(1-params(9)*params(12))));
g1(5,19)=(-params(14));
g1(5,27)=params(10);
g1(6,29)=1;
g1(7,30)=1;
g1(8,27)=T(2);
g1(8,31)=1;
g1(8,33)=(-T(2));
g1(9,19)=T(3);
g1(9,27)=(-T(3));
g1(9,29)=1;
g1(9,30)=1;
g1(9,31)=(-1);
g1(10,13)=(-T(1));
g1(10,14)=(-(1-T(1)));
g1(10,27)=1;
g1(11,13)=(-params(1));
g1(11,14)=(-(1-params(1)));
g1(11,18)=1;
g1(12,11)=(-params(1));
g1(12,12)=(-(1-params(1)));
g1(12,16)=1;
g1(13,9)=(-params(4));
g1(13,10)=(-(1-params(4)));
g1(13,17)=1;
g1(14,13)=(-1);
g1(14,14)=1;
g1(15,2)=1-params(5);
g1(16,3)=1-params(6);
g1(17,2)=(-0.16);
g1(17,9)=1;
g1(18,3)=(-0.16);
g1(18,10)=1;
g1(19,32)=(-params(17));
g1(19,33)=1;
g1(19,34)=(-params(18));
g1(20,32)=1-T(4);
g1(20,33)=1-params(3);
g1(20,34)=(-(1-params(3)));
g1(21,34)=1;
g1(21,35)=(-params(4));
g1(21,36)=(-(1-params(4)));
g1(22,27)=(-1);
g1(22,35)=1;
g1(23,27)=(-1);
g1(23,36)=1;
g1(24,1)=1;
g1(24,2)=(-1);
g1(24,3)=(-1);
g1(25,14)=1;
g1(26,15)=(-1);
g1(26,21)=1;
g1(26,22)=(-(1/T(1)));
g1(27,17)=(-1);
g1(27,20)=(-1);
g1(27,23)=1;
g1(28,13)=T(1);
g1(28,14)=1-T(1);
g1(28,19)=(-1);
g1(28,24)=1;
g1(29,20)=(-params(3));
g1(29,25)=1;
g1(30,17)=(-(1-params(3)));
g1(30,26)=1;
g1(31,5)=1;
g1(31,26)=(-((1-params(3))*params(4)/params(1)));
g1(32,6)=1;
g1(32,26)=(-((1-params(3))*(1-params(4))/(1-params(1))));
g1(33,19)=(-12);
g1(33,28)=1;
g1(34,7)=1;
g1(34,11)=params(8);
g1(34,15)=(-(1-T(1)));
g1(34,20)=params(7);
g1(35,8)=1;
g1(35,12)=params(8);
g1(35,15)=T(1);
g1(35,20)=params(7);
g1(36,4)=1;
g1(36,7)=(-params(1));
g1(36,8)=(-(1-params(1)));
if ~isreal(g1)
    g1 = real(g1)+2*imag(g1);
end
end
